<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="class179.js"></script>
    <script>
        window.onload = function () {
            var selectObj = document.getElementById("class");
            var str = "";
            for(var i = 0; i < classArray.length; i++){
                var obj = classArray[i];
                str += "<option value='" + obj.id + "'>" + obj.name + "</option>"
            }
            selectObj.innerHTML = str;
            console.log(classArray);
        }
    </script>
</head>
<body>
    班级：<select id="class"></select>
</body>
</html>